package com.fourforfo.fourmall.member.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class MemberRegisterVO {

    @NotEmpty(message = "用户名必须提交")
    @Length(min=6,max=18,message = "用户名必须是6-18位")
    private String username;

    @NotEmpty(message = "用户密码不能为空")
    @Length(min=6,max=18,message = "用户密码必须是6-18位")
    private String password;

    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = "^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$",message = "手机号格式不正确")
    private String phone;
}
